def calc():
    list_price = [1, 1.02, 1.05, 0.99, 1.04, 1.01, 1.07, 1.08, 1.09, 1.07, 1.15, 1.12, 1.11, 1.14, 1.17, 1.18, 1.19,
                  1.21]
    for i in range(len(list_price)):
        cost = round(sum(list_price[:i + 1]) / (i + 1), 3)
        a = (list_price[i] - cost) / cost
        net_profit = "%.2f%%" % (a * 100)
        print(net_profit)


if __name__ == '__main__':
    calc()
    print("ok")
